import React from 'react';

export class Hello extends React.Component {
  constructor() {
    super();
    this.state = {
      txt: 'wahaha',
    };
  }

  render() {
    console.log('Hello组件的props', this.props);
    return (
      <div style={{ border: '1px solid blue', padding: 20 }}>
        <h2>Hello组件</h2>
        {this.props.children(this.state.txt)}
      </div>
    );
  }
}
